Skip to content

Implemented Robust Least Square for Rectangle Fitting on LIDAR Point Cloud#55

Merged
ShisatoYano merged 14 commits into
ShisatoYano:mainfrom
shreyshet:main
Feb 8, 2026
Merged

Implemented Robust Least Square for Rectangle Fitting on LIDAR Point Cloud#55
ShisatoYano merged 14 commits into
ShisatoYano:mainfrom
shreyshet:main

Conversation

@shreyshet
Copy link
Copy Markdown
Contributor

Results

RED: Robust LS, BLUE: Previous Geometric Approach
point_cloud_robustLS_rectangle_fitting

rmse_static_object

Description

This PR replaces the L-Shape rectangle fitting approach with an optimization-based rectangle detection pipeline for LIDAR point cloud.

Key Changes

  1. Hybrid Initialization: Initializing the optimization with the geometric sweep approach for orientation and a diameter-based midpoint for spatial centering.

  2. SDF Residual Function: Implemented a Signed Distance Field (SDF) calculation to determine point-to-box boundaries accurately in the local manifold.

  3. M-Estimator Integration: Switched the optimizer loss to Huber, providing a significant improvement in RMSE by balancing surface noise averaging with outlier rejection.

  4. Telemetry: Added a FittingDataTracker class to log and visualize performance metrics (RMSE and Localization accuracy) post-simulation.

Performance Impact

  1. Stability: Eliminated orientation "flipping" and diagonal fitting.

  2. Precision: Sub-degree heading accuracy and reduced center-point jitter.

  3. Validation: RMSE comparison plots now clearly distinguish the refinement advantage over the raw geometric baseline.

How to Use

  1. Run standalone Robust Least Square Rectangle Fitting simulation
python src/simulations/perception/point_cloud_rectangle_fitting/point_cloud_robustLS_rectangle_fitting.py
  1. Run tests
python -m pytest test/test_point_cloud_robustLS_rectangle_fitting.py -v

Comment thread src/components/detection/l_shape_fitting/robust_least_squares_detector.py Outdated
Comment thread src/components/detection/l_shape_fitting/robust_least_squares_detector.py Outdated
Copy link
Copy Markdown
Owner

@ShisatoYano ShisatoYano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed your implementation and it was almost great. Please just modify the header comment I left some comments. Thanks.

@shreyshet
Copy link
Copy Markdown
Contributor Author

I made the change.
Let me know if I missed anything else.

@ShisatoYano ShisatoYano self-requested a review February 8, 2026 04:22
@ShisatoYano ShisatoYano merged commit 2dc7c50 into ShisatoYano:main Feb 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants